import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String str=scanner.nextLine();
        int l=str.length()-1;
        ReservePrintString(str,l);
    }
    public static void ReservePrintString(String s,int l){//递归反向打印字符串
        if(l<0){
            return;
        }
        System.out.println(s.charAt(l--));
        ReservePrintString(s,l);
    }
}